<template>
  <div>
    <label>物品名称</label>
    <input type="text" v-model="itemname" class="" />
  </div>
  <div>
    <label for="">物品属性</label>
    <input type="text" v-model="itemattr" class="" />
  </div>
  <div>
    <label for="">物品位置</label>
    <input type="text" v-model="itempos" class="" />
  </div>
  <div><label for="">更新时间:</label>
  <label for="">{{uptime}}</label>
  </div>
  <div style="float: left"><button @click="takepic">拍照</button></div>
  <div style="float: right"><button>提交</button></div>
  <div style="height: 10px; clear: both"></div>
  <img style="width: 100%; height: 100%" :src="imgsrc" alt="物品照片" />
  {{ df }}
</template>

<script>
export default {
  name: "EditItem",
  props: {
    msg: String,
  },
  data() {
    return {
      df: "null",
      itemname: "",
      imgsrc: "",
      uptime:'',
    };
  },
  mounted() {
    var se = window.location.search;
    se = decodeURI(se.substring(6)); //参数部分
    this.dd = se;
    this.df = this.msg;
    this.dd = this.msg;
    this.uptime='2021-09-23 39:23:33'
    this.imgsrc =
      "";
  },
  methods: {
    takepic: function () {
      alert("takepic");
    },
  },
};
</script>